<template>
  <div class="modal-backdrop">
    <div class="modal" :style="mainStyles">
      <div class="modal-header">
        <slot name="modal-header"></slot>
<!--        <button class="md-close" @click="closeModal">关闭</button>-->
      </div>
      <div class="modal-body-left">
        <slot name="modal-body-left"></slot>
      </div>
      <div class="modal-body-right">
        <slot name="modal-body-right"></slot>
      </div>
      <div class="modal-footer">
        <slot name="modal-footer"></slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'FruitInfoModal',
  props:["mdShow"],
  data() {
    return {
    }
  },
  methods: {
    closeSelf() {
      this.$emit("closeme");
    }
  }
}
</script>


<style>
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0,0,0,.3);
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal {
  background-color: #fff;
  box-shadow: 2px 2px 20px 1px;
  overflow-x:auto;
  //display: flex;
  flex-direction: column;
  border-radius: 16px;
  width: 700px;
  height: 728px;
}
.modal-header {
  border-bottom: 1px solid #eee;
  color: #313131;
  justify-content: space-between;
  padding: 15px;
  display: flex;
  height: 73px;
}
.modal-footer {
  height: 3%;
  border-top: 1px solid #eee;
  justify-content: flex-end;
  padding: 15px;
  display: flex;
}
.modal-body-left {
  position: relative;
  padding: 20px 10px;
}
.modal-body-right {
  margin: unset;
  margin:0px;
  width: 90%;
  height: 270px;
  position: relative;
  padding: 0px 0px;
  left: 5%;
  transform: translateY(-20%);
  white-space:nowrap;
}
.btn-close, .btn-confirm {
  border-radius: 8px;
  margin-left:16px;
  width:56px;
  height: 36px;
  border:none;
  cursor: pointer;
}
.btn-close {
  color: #313131;
  background-color:transparent;
}
.btn-confirm {
  color: #fff;
  background-color: #2d8cf0;
}


</style>
